<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<div id="div1">

		</div>
		<button>000</button>
	</body>
	<script src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js


"></script>
	<script type="text/javascript">
		//  创建对象
		var btn = document.querySelector('button');
		btn.onclick = function() {
			var xhr;
			if(window.XMLHttpRequest) {
				xhr = new XMLHttpRequest();
			} else {
				xhr = new ActiveXObject('Mircosoft.XMLHTTP');
			}

			//  发送请求
			xhr.open('GET', '111.txt', true);
			xhr.send();

			//  响应
			var div = document.getElementById('div1');

			xhr.onreadystatechange = function() {
				if(xhr.readyState == 4 && xhr.status == 200) {
					var data = xhr.responseText;
					div.innerHTML = data;
				}
			}
		}
	</script>